package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.entity.AbdulBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 会员列表实体类
 */
@Data
@ApiModel("会员信息")
@TableName("member_list")
public class MemberList extends AbdulBaseEntity {

    @ApiModelProperty(value = "会员唯一标识符（自增主键）", example = "1")
    private Long id;

    @ApiModelProperty(value = "会员姓名", required = true, example = "张三")
    private String memberName;

    @ApiModelProperty(value = "会员手机号码（唯一约束）", required = true, example = "13800000000")
    private String phone;

    @ApiModelProperty(value = "会员卡号（唯一标识，如实体卡号或虚拟卡号）", example = "CARD123456789")
    private String memberCardNo;

    @ApiModelProperty(value = "出生日期", example = "1990-01-01 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateBirth;

    @ApiModelProperty(value = "会员等级id /关联会员等级表")
    private Long memberLevelId;

    @ApiModelProperty(value = "会员状态（1正常，2停用，3已过期）")
    private Integer memberStatus;

    @ApiModelProperty(value = "会员性别（MALE: 男，FEMALE: 女，UNKNOWN: 未知）", allowableValues = "MALE, FEMALE, UNKNOWN", example = "UNKNOWN")
    private String gender;

    @ApiModelProperty(value = "推荐会员ID（关联会员列表表的id，外键）", example = "1")
    private Long referrerId;

    @ApiModelProperty(value = "注册门店名称", example = "旗舰店")
    private String registerStore;

    @ApiModelProperty(value = "操作员工姓名（记录创建或修改的员工）", example = "李四")
    private String operatorStaff;

    @ApiModelProperty(value = "验证方式（PASSWORD: 密码验证，TEXT_MESSAGE: 短信验证，NO_AUTH: 不验证）", allowableValues = "PASSWORD,TEXT_MESSAGE, NO_AUTH", example = "PASSWORD")
    private String authMethod;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "可用积分（当前可使用的积分数量）", example = "100")
    private Integer availablePoints;

    @ApiModelProperty(value = "累计积分")
    private Integer totalAvailablePoints;

    @ApiModelProperty(value = "可用余额（当前可用的现金余额）", example = "100.00")
    private BigDecimal availableBalance;

    @ApiModelProperty(value = "可用赠送余额（当前可用的赠送余额）", example = "50.00")
    private BigDecimal availableGiftBalance;

    @ApiModelProperty(value = "总余额（可用余额 + 可用赠送余额）", example = "150.00")
    private BigDecimal totalBalance;

    @ApiModelProperty(value = "过期时间", example = "2025-01-01 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expirationDate;

    @ApiModelProperty(value = "联系地址", example = "上海市浦东新区某路123号")
    private String address;

    @ApiModelProperty("是否是黑名单 1-否 2-是")
    private Integer isBlacklist;

    @ApiModelProperty("门店id")
    private Long storeId;

    @ApiModelProperty("是否删除 0-未删除 1-已删除")
    private Integer isDelete;


    //DTO
    @ApiModelProperty("创建门店")
    @TableField(exist = false)
    private String createStore;

    @ApiModelProperty("桌台时长卡 (张)")
    @TableField(exist = false)
    private Integer tableDurationCard = 0;

    @ApiModelProperty("桌台次卡 （张）")
    @TableField(exist = false)
    private Integer tableSingleCard = 0;

    @ApiModelProperty("商品次卡（张）")
    @TableField(exist = false)
    private Integer productSingleCard = 0;

    @ApiModelProperty("代金券 （张）")
    @TableField(exist = false)
    private Integer coupon = 0;

    @ApiModelProperty("储值卡（张）")
    @TableField(exist = false)
    private Integer storedValueCard = 0;

    @ApiModelProperty("操作类型 1-增加积分 2-扣除积分 3-修改 4-停用 5-拉黑 6-删除")
    @TableField(exist = false)
    private Integer operationType;

    @ApiModelProperty(value = "推荐会员ID姓名")
    @TableField(exist = false)
    private String referrerIdDesc;
}
